/* 输入*/
import csvInput from './input/csv'
import excelInput from './input/excel'
import jsonInput from './input/json'
import tableInput from './input/table'

/* 输出*/
import excelOutput from './output/excel'
import jsonOutput from './output/json'
import sqlFileOutput from './output/sql'
import xmlOutput from './output/xml'
import textFileOutput from './output/text'
import tableOutput from './output/table'
import propertyOutput from './output/property'

/* Streaming*/
import jmsConsumer from './streaming/jms-consumer'
import jmsProducer from './streaming/jms-producer'
import mqttConsumer from './streaming/mqtt-consumer'
import mqttProducer from './streaming/mqtt-producer'

/* 转换*/
import valueMapper from './transform/value-mapper'
import splitFieldToRows from './transform/split-field-to-rows'
import denormaliser from './transform/denormaliser'
import stringCut from './transform/string-cut'
import unique from './transform/unique'
import uniqueRowsByHashSet from './transform/unique-by-hash'
import constant from './transform/constant'
import sequence from './transform/sequence'
import selectValues from './transform/select-values'
import stringOperations from './transform/string-operations'
import replaceString from './transform/replace-string'
import fieldSplitter from './transform/field-splitter'
import sortRows from './transform/sort-rows'
import normaliser from './transform/normaliser'

/* 应用*/
import writeToLog from './utility/write-to-log'
import sendMail from './utility/send-mail'
import ssh from './utility/ssh'

/* 流程*/
import dummy from './flow/dummy'

/* 脚本*/
import janino from './scripting/java'
import jsScripting from './scripting/javascript'
import formula from './scripting/formula'
import execSql from './scripting/sql'
import regexEval from './scripting/regex-eval'

/* 查询*/
import http from './lookup/http'
import httpPost from './lookup/http-post'
import rest from './lookup/rest'
import dbLookup from './lookup/db'

/* 连接*/
import mergeRows from './joins/merge-rows'
import sortedMerge from './joins/sorted-merge'
import joinRows from './joins/join-rows'
import mergeJoin from './joins/merge-join'

/**
 * 注册节点
 * @param flow 流程图对象
 */
export default function registerNode(flow) {
  /* 输入*/
  csvInput(flow)
  excelInput(flow)
  jsonInput(flow)
  tableInput(flow)

  /* 输出*/
  excelOutput(flow)
  jsonOutput(flow)
  sqlFileOutput(flow)
  xmlOutput(flow)
  textFileOutput(flow)
  tableOutput(flow)
  propertyOutput(flow)

  /* Streaming*/
  jmsConsumer(flow)
  jmsProducer(flow)
  mqttConsumer(flow)
  mqttProducer(flow)

  /* 转换*/
  valueMapper(flow)
  splitFieldToRows(flow)
  denormaliser(flow)
  stringCut(flow)
  unique(flow)
  uniqueRowsByHashSet(flow)
  constant(flow)
  sequence(flow)
  selectValues(flow)
  stringOperations(flow)
  replaceString(flow)
  fieldSplitter(flow)
  sortRows(flow)
  normaliser(flow)

  /* 应用*/
  writeToLog(flow)
  sendMail(flow)
  ssh(flow)

  /* 流程*/
  dummy(flow)

  /* 脚本*/
  janino(flow)
  jsScripting(flow)
  formula(flow)
  execSql(flow)
  regexEval(flow)

  /* 查询*/
  http(flow)
  httpPost(flow)
  rest(flow)
  dbLookup(flow)

  /* 连接*/
  mergeRows(flow)
  sortedMerge(flow)
  joinRows(flow)
  mergeJoin(flow)
}
